3.142 \(\int \coth ^4(c+d x) (a+b \tanh ^2(c+d x)) \, dx\)

Optimal. Leaf size=36 \[ -\frac {(a+b) \coth (c+d x)}{d}+x (a+b)-\frac {a \coth ^3(c+d x)}{3 d} \]

[Out]

(a+b)*x-(a+b)*coth(d*x+c)/d-1/3*a*coth(d*x+c)^3/d

________________________________________________________________________________________

Rubi [A]  time = 0.04, antiderivative size = 36, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {3629, 12, 3473, 8} \[ -\frac {(a+b) \coth (c+d x)}{d}+x (a+b)-\frac {a \coth ^3(c+d x)}{3 d} \]

Antiderivative was successfully verified.

[In]

Int[Coth[c + d*x]^4*(a + b*Tanh[c + d*x]^2),x]

[Out]

(a + b)*x - ((a + b)*Coth[c + d*x])/d - (a*Coth[c + d*x]^3)/(3*d)

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 3473

Int[((b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(b*(b*Tan[c + d*x])^(n - 1))/(d*(n - 1)), x] - Dis
t[b^2, Int[(b*Tan[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1]

Rule 3629

Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (C_.)*tan[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[
((A*b^2 + a^2*C)*(a + b*Tan[e + f*x])^(m + 1))/(b*f*(m + 1)*(a^2 + b^2)), x] + Dist[1/(a^2 + b^2), Int[(a + b*
Tan[e + f*x])^(m + 1)*Simp[a*(A - C) - (A*b - b*C)*Tan[e + f*x], x], x], x] /; FreeQ[{a, b, e, f, A, C}, x] &&
 NeQ[A*b^2 + a^2*C, 0] && LtQ[m, -1] && NeQ[a^2 + b^2, 0]

Rubi steps

\begin {align*} \int \coth ^4(c+d x) \left (a+b \tanh ^2(c+d x)\right ) \, dx &=-\frac {a \coth ^3(c+d x)}{3 d}+\int (a+b) \coth ^2(c+d x) \, dx\\ &=-\frac {a \coth ^3(c+d x)}{3 d}+(a+b) \int \coth ^2(c+d x) \, dx\\ &=-\frac {(a+b) \coth (c+d x)}{d}-\frac {a \coth ^3(c+d x)}{3 d}+(a+b) \int 1 \, dx\\ &=(a+b) x-\frac {(a+b) \coth (c+d x)}{d}-\frac {a \coth ^3(c+d x)}{3 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [C]  time = 0.04, size = 61, normalized size = 1.69 \[ -\frac {a \coth ^3(c+d x) \, _2F_1\left (-\frac {3}{2},1;-\frac {1}{2};\tanh ^2(c+d x)\right )}{3 d}-\frac {b \coth (c+d x) \, _2F_1\left (-\frac {1}{2},1;\frac {1}{2};\tanh ^2(c+d x)\right )}{d} \]

Antiderivative was successfully verified.

[In]

Integrate[Coth[c + d*x]^4*(a + b*Tanh[c + d*x]^2),x]

[Out]

-1/3*(a*Coth[c + d*x]^3*Hypergeometric2F1[-3/2, 1, -1/2, Tanh[c + d*x]^2])/d - (b*Coth[c + d*x]*Hypergeometric
2F1[-1/2, 1, 1/2, Tanh[c + d*x]^2])/d

________________________________________________________________________________________

fricas [B]  time = 0.43, size = 156, normalized size = 4.33 \[ -\frac {{\left (4 \, a + 3 \, b\right )} \cosh \left (d x + c\right )^{3} + 3 \, {\left (4 \, a + 3 \, b\right )} \cosh \left (d x + c\right ) \sinh \left (d x + c\right )^{2} - {\left (3 \, {\left (a + b\right )} d x + 4 \, a + 3 \, b\right )} \sinh \left (d x + c\right )^{3} - 3 \, b \cosh \left (d x + c\right ) + 3 \, {\left (3 \, {\left (a + b\right )} d x - {\left (3 \, {\left (a + b\right )} d x + 4 \, a + 3 \, b\right )} \cosh \left (d x + c\right )^{2} + 4 \, a + 3 \, b\right )} \sinh \left (d x + c\right )}{3 \, {\left (d \sinh \left (d x + c\right )^{3} + 3 \, {\left (d \cosh \left (d x + c\right )^{2} - d\right )} \sinh \left (d x + c\right )\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(coth(d*x+c)^4*(a+b*tanh(d*x+c)^2),x, algorithm="fricas")

[Out]

-1/3*((4*a + 3*b)*cosh(d*x + c)^3 + 3*(4*a + 3*b)*cosh(d*x + c)*sinh(d*x + c)^2 - (3*(a + b)*d*x + 4*a + 3*b)*
sinh(d*x + c)^3 - 3*b*cosh(d*x + c) + 3*(3*(a + b)*d*x - (3*(a + b)*d*x + 4*a + 3*b)*cosh(d*x + c)^2 + 4*a + 3
*b)*sinh(d*x + c))/(d*sinh(d*x + c)^3 + 3*(d*cosh(d*x + c)^2 - d)*sinh(d*x + c))

________________________________________________________________________________________

giac [B]  time = 0.19, size = 86, normalized size = 2.39 \[ \frac {3 \, {\left (d x + c\right )} {\left (a + b\right )} - \frac {2 \, {\left (6 \, a e^{\left (4 \, d x + 4 \, c\right )} + 3 \, b e^{\left (4 \, d x + 4 \, c\right )} - 6 \, a e^{\left (2 \, d x + 2 \, c\right )} - 6 \, b e^{\left (2 \, d x + 2 \, c\right )} + 4 \, a + 3 \, b\right )}}{{\left (e^{\left (2 \, d x + 2 \, c\right )} - 1\right )}^{3}}}{3 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(coth(d*x+c)^4*(a+b*tanh(d*x+c)^2),x, algorithm="giac")

[Out]

1/3*(3*(d*x + c)*(a + b) - 2*(6*a*e^(4*d*x + 4*c) + 3*b*e^(4*d*x + 4*c) - 6*a*e^(2*d*x + 2*c) - 6*b*e^(2*d*x +
 2*c) + 4*a + 3*b)/(e^(2*d*x + 2*c) - 1)^3)/d

________________________________________________________________________________________

maple [A]  time = 0.24, size = 46, normalized size = 1.28 \[ \frac {a \left (d x +c -\coth \left (d x +c \right )-\frac {\left (\coth ^{3}\left (d x +c \right )\right )}{3}\right )+b \left (d x +c -\coth \left (d x +c \right )\right )}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(coth(d*x+c)^4*(a+b*tanh(d*x+c)^2),x)

[Out]

1/d*(a*(d*x+c-coth(d*x+c)-1/3*coth(d*x+c)^3)+b*(d*x+c-coth(d*x+c)))

________________________________________________________________________________________

maxima [B]  time = 0.33, size = 105, normalized size = 2.92 \[ \frac {1}{3} \, a {\left (3 \, x + \frac {3 \, c}{d} - \frac {4 \, {\left (3 \, e^{\left (-2 \, d x - 2 \, c\right )} - 3 \, e^{\left (-4 \, d x - 4 \, c\right )} - 2\right )}}{d {\left (3 \, e^{\left (-2 \, d x - 2 \, c\right )} - 3 \, e^{\left (-4 \, d x - 4 \, c\right )} + e^{\left (-6 \, d x - 6 \, c\right )} - 1\right )}}\right )} + b {\left (x + \frac {c}{d} + \frac {2}{d {\left (e^{\left (-2 \, d x - 2 \, c\right )} - 1\right )}}\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(coth(d*x+c)^4*(a+b*tanh(d*x+c)^2),x, algorithm="maxima")

[Out]

1/3*a*(3*x + 3*c/d - 4*(3*e^(-2*d*x - 2*c) - 3*e^(-4*d*x - 4*c) - 2)/(d*(3*e^(-2*d*x - 2*c) - 3*e^(-4*d*x - 4*
c) + e^(-6*d*x - 6*c) - 1))) + b*(x + c/d + 2/(d*(e^(-2*d*x - 2*c) - 1)))

________________________________________________________________________________________

mupad [B]  time = 1.17, size = 162, normalized size = 4.50 \[ \frac {\frac {2\,b}{3\,d}-\frac {2\,{\mathrm {e}}^{2\,c+2\,d\,x}\,\left (2\,a+b\right )}{3\,d}}{{\mathrm {e}}^{4\,c+4\,d\,x}-2\,{\mathrm {e}}^{2\,c+2\,d\,x}+1}-\frac {\frac {2\,\left (2\,a+b\right )}{3\,d}-\frac {4\,b\,{\mathrm {e}}^{2\,c+2\,d\,x}}{3\,d}+\frac {2\,{\mathrm {e}}^{4\,c+4\,d\,x}\,\left (2\,a+b\right )}{3\,d}}{3\,{\mathrm {e}}^{2\,c+2\,d\,x}-3\,{\mathrm {e}}^{4\,c+4\,d\,x}+{\mathrm {e}}^{6\,c+6\,d\,x}-1}+x\,\left (a+b\right )-\frac {2\,\left (2\,a+b\right )}{3\,d\,\left ({\mathrm {e}}^{2\,c+2\,d\,x}-1\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(coth(c + d*x)^4*(a + b*tanh(c + d*x)^2),x)

[Out]

((2*b)/(3*d) - (2*exp(2*c + 2*d*x)*(2*a + b))/(3*d))/(exp(4*c + 4*d*x) - 2*exp(2*c + 2*d*x) + 1) - ((2*(2*a +
b))/(3*d) - (4*b*exp(2*c + 2*d*x))/(3*d) + (2*exp(4*c + 4*d*x)*(2*a + b))/(3*d))/(3*exp(2*c + 2*d*x) - 3*exp(4
*c + 4*d*x) + exp(6*c + 6*d*x) - 1) + x*(a + b) - (2*(2*a + b))/(3*d*(exp(2*c + 2*d*x) - 1))

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (a + b \tanh ^{2}{\left (c + d x \right )}\right ) \coth ^{4}{\left (c + d x \right )}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(coth(d*x+c)**4*(a+b*tanh(d*x+c)**2),x)

[Out]

Integral((a + b*tanh(c + d*x)**2)*coth(c + d*x)**4, x)

________________________________________________________________________________________